Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Dec 14, 2025

Summary

Adds proper URL signing support to storage backends with type-safe methods in the ObjectStoreProtocol. Also includes logging improvements across the codebase and a new config normalization utility.

The Problem

The ObjectStoreProtocol was missing sign and sign_async methods even though ObStoreBackend implemented them. This caused type checking issues when using URL signing functionality (see #286).

The Solution

  • Added sign_sync, sign_async, and supports_signing property to ObjectStoreProtocol
  • Implemented proper signing in ObStoreBackend using obstore's native obs.sign() with batch support
  • Added NotImplementedError implementations in FSSpec and LocalStore backends
  • Updated logging to use get_logger() helper with structured extra data instead of string interpolation

Key Features

  • Batch signing: sign_sync/sign_async accept single path or list of paths
  • Protocol support: supports_signing property for runtime capability checking
  • Proper validation: Expires limit (7 days max), protocol checks (S3/GCS/Azure only)
  • Logging cleanup: Replaced warning-level logs with debug-level structured logging

Closes #286

Add teardown_function() to clear correlation IDs after tests to prevent
test pollution when running with pytest-xdist. The test_correlation_id_formats
test sets a long correlation ID ("a" * 1000) that was leaking into other
tests running in the same process.
@cofin cofin merged commit b574e55 into main Dec 14, 2025
10 checks passed
@cofin cofin deleted the fix/url-sign branch December 14, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ObjectStoreProtocol missing sign/sign_async methods

2 participants